package cn.imvc.app.models;

import java.util.List;

import org.springframework.data.domain.Page;

import cn.imvc.app.entities.Dealer;
import cn.imvc.app.entities.DealerLevel;
import cn.imvc.data.domain.ViewRequest;

public interface DealerModel{

	Dealer getOne(int id);

	Page<Object[]> findAll(int id, ViewRequest viewRequest);

	void updateLevel(int id,Dealer dealer);

	List<Dealer> findByDealerLevel(DealerLevel dealerLevel);
	
	/**
	 * 分销商积分自动升级
	 * @param dealer 分销商
	 */
	void updatePointAuto(Dealer dealer);

	List<Dealer> findByDealerLevelNot(DealerLevel findByLevel);
	
	/**
	 * 团队分佣
	 * @param dealer
	 * @param string 时间 / 年月
	 */
	void updateTeamCommission(Dealer dealer, String string);

	List<Dealer> findByDealerLevelOrDealerLevel(DealerLevel dealerLevel, DealerLevel dealerLevel2);
}
